package com.huawei.hwclouds.lubanops.demo.order.biz.service;

import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
import org.springframework.beans.factory.annotation.Autowired;

import com.huawei.hwclouds.lubanops.demo.order.biz.BizAbstractJUnitTest;
import com.huawei.hwclouds.lubanops.demo.order.biz.model.OrdersModel;

/**
 * @author y00438022
 * @since 2020/8/17
 **/
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class OrderServiceTest extends BizAbstractJUnitTest {

    @Autowired
    private OrdersService ordersService;

    @Test
    public void addOrders() {
        Short tag = 0;
        OrdersModel model1 = new OrdersModel();
        model1.setUserId("1001");
        model1.setUserName("test");
        model1.setMerchandiseId(1);
        model1.setNum(2);
        model1.setPrice(21.2);
        model1.setShop("成都旗舰店");
        model1.setUserId("1");
        model1.setUserName("测试用户");
        model1.setOrderNo("002");
        model1.setTitle("无");
        model1.setActualPayment(12.0);
        model1.setMerchandiseId(1);
        model1.setOrderNo("0001");
        model1.setActualPayment(20.0);
        model1.setReceipt(tag);
        model1.setDetails("dfgdfgh无");
        ordersService.create(model1);

    }
}
